#!/usr/bin/perl

use strict;
use warnings;

use lib qw{
/home/tkemmer/lib/perl5
/home/tkemmer/src/jasperl/JasPerl/lib
/home/tkemmer/src/jasperl/JasPerl-CGI/lib
/home/tkemmer/src/jasperl/JasPerl-JSTL/lib
/home/tkemmer/src/jasperl/work
};

use CGI;
use JasPerl::CGI;
use JasPerl::Util::Exceptions;

my $cgi = CGI->new;
my $jsp = JasPerl::CGI->new(cgi => $cgi);

eval {
    $jsp->dispatch($cgi->path_info);
};
if (my $e = JasPerl::Util::Exception->caught()) {
    $e->print_stack_trace();
} elsif ($@) {
    warn "CGI ERROR: $@";
}
exit 0;
